#define _CRT_SECURE_NO_WARNINGS 1

#include"SeqList.h"

void SeqListTest1()
{
	SL s;
	SLInit(&s);
	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPushBack(&s, 5);
	SLPushBack(&s, 6);
	SLPrint(&s);

	SLPopBack(&s);
	SLPopBack(&s);
	SLPrint(&s);

	SLPushFront(&s,0);
	SLPushFront(&s, 0);
	SLPrint(&s);

	SLPopFront(&s);
	SLPopFront(&s);
	SLPrint(&s);

	int ret = SLFind(&s, 4);
	printf("%d\n", ret);

	SLInsert(&s, 2, 8);
	SLPrint(&s);

	SLErase(&s, 2);
	SLPrint(&s);

	SLDestroy(&s);
}

int main()
{
	SeqListTest1();
	return 0;
}



#if 0
void TestSeqList1()
{
	SL s;
	SLInit(&s);
	SLPushBack(&s, 1);
	SLPushBack(&s, 2);
	SLPushBack(&s, 3);
	SLPushBack(&s, 4);
	SLPushBack(&s, 5);	
	SLPushBack(&s, 6);
	SLPushBack(&s, 7);
	SLPushBack(&s, 8);
	SLPrint(&s);

	SLPopBack(&s);
	SLPopBack(&s);
	SLPrint(&s);

	SLPushFront(&s, 0);
	SLPushFront(&s, -1);
	SLPrint(&s);

	SLPopFront(&s);
	SLPopFront(&s);
	SLPrint(&s);

	SLInsert(&s, 4, 1);
	SLInsert(&s, 5, 1);
	SLPrint(&s);

	SLErase(&s, 4);
	SLErase(&s, 4);
	SLPrint(&s);

	int ret=SLFind(&s, 5);
	printf("%d\n", ret);
	SLPrint(&s);

	SLDestroy(&s);
}

int main()
{
	TestSeqList1();
	return 0;
}
#endif 